package org.lanqiao.tjut.model;

import java.util.ArrayList;
import java.util.List;

import org.lanqiao.tjut.bean.TBAdminBean;
import org.lanqiao.tjut.db.DBFactory;

public class UserInfoModel {
	public int registerUserInfo(TBAdminBean userB){
		int re = 0;
		//组织sql语句添加注册信息
		String regSql = "insert into tbadmins(admins_name,admins_psw)"+"values(?,?)";
		// 数据库操作sql语句参数集合
		List<Object> lstParas = new ArrayList<>();
		//添加注册用户信息
		lstParas.add(userB.getAdmins_name());
		lstParas.add(userB.getAdmins_psw());
		//调用db层
		re = DBFactory.getDBDriverInstance().update(regSql.toString(), lstParas.toArray());
		return re;
		
	}

}
